home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
drawanim.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
138 lines
/*
* $VER: DrawAnim 2.0.0 (22.7.94)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* Revised for ImageFX release 2.0.
*
* Create an animation that consists of a series of drawing commands
* performed over a toolbox display.
*
*/
OPTIONS RESULTS
SIGNAL ON BREAK_C
tool.1 = Line
tool.2 = Box
tool.3 = FilledBox
tool.4 = Oval
tool.5 = FilledOval
index = 0
width = 640
height = 400
CALL RANDOM(0,999,TIME('Seconds')) /* randomize */
outpath = GETCLIP('DrawAnim_OutPath')
outfile = GETCLIP('DrawAnim_OutFile')
IF outpath = "" THEN DO
GetPrefs RendPath
outpath = result
outfile = 'draw.anim'
END
RequestFile '"Select Output Animation File:"' outpath outfile
IF rc ~= 0 THEN EXIT
outname = result
outfile = filereq.file
outpath = filereq.path
SETCLIP('DrawAnim_OutPath', outpath)
SETCLIP('DrawAnim_OutFile', outfile)
IF EXISTS(outname) THEN
ADDRESS COMMAND 'Delete >NIL:' outname
Render Amiga
Render Mode Hires Lace Lace
Render Colors 16
Render Dither 4 0 0
CreateBuffer width height Force
LockRange 0 ON
DO i = 1 TO 60
Render Close
Message 'Frame' i
Redraw Off
Swap
DrawTool tool.index
GrabBuffer 'IMAGEFX.1' Force
Swap
CALL Primitive
Swap
Scissors
Box 0 0 640 80
BrushHandle 0 0
Swap
Point 0 height-80
KillBrush
Redraw On
Render Go
SaveRenderedAs ANIM outname Keep Append
END
BREAK_C:
SaveRenderedAs ANIM outname Close
Render Close
EXIT
Primitive:
PROCEDURE EXPOSE index width height
LockGUI
ActiveColor RANDOM(4,15)
x0 = RANDOM(0,width-1)
y0 = RANDOM(0,height-81)
x1 = RANDOM(0,width-1)
y1 = RANDOM(0,height-81)
w = RANDOM(0,width%3)
h = RANDOM(0,height%3)
SELECT
WHEN index = 1 THEN DO
Line x0 y0 x1 y1
END
WHEN index = 2 THEN DO
Box x0 y0 w h
END
WHEN index = 3 THEN DO
FilledBox x0 y0 w h
END
WHEN index = 4 THEN DO
Oval x0 y0 w h
END
WHEN index = 5 THEN DO
FilledOval x0 y0 w h
END
OTHERWISE NOP
END
UnlockGUI Quiet
index = index + 1
IF index > 5 THEN index = 1
RETURN 0